package com.shenglue.ssi.service;

import java.util.List;

import com.shenglue.ssi.dao.BuyInDetailDao;
import com.shenglue.ssi.dao.BuyInMainDao;
import com.shenglue.ssi.domain.BuyInDetail;

public class BuyInDetailServiceImpl implements BuyInDetailService {

	private BuyInDetailDao buyInDetailDao;

	public BuyInDetailDao getBuyInDetailDao() {
		return buyInDetailDao;
	}

	public void setBuyInDetailDao(BuyInDetailDao buyInDetailDao) {
		this.buyInDetailDao = buyInDetailDao;
	}

	/**
	 * 查询某入库单的 所有入库单细表信息
	 */
	public List<BuyInDetail> selectAllBuyInDetail( int buyInId ) {
		return buyInDetailDao.selectAllBuyInDetail( buyInId );
	}

	/**
	 * 增加入库单细表记录
	 */
	public boolean saveBuyInDetail( BuyInDetail buyInDetail ) {
		return buyInDetailDao.saveBuyInDetail( buyInDetail );
	}
	/**
	 * 删除入库单细表记录
	 */
	public boolean deleteBuyInDetail( int buyInDetailId ) {
		return buyInDetailDao.deleteBuyInDetail( buyInDetailId );
	}
	/**
	 * 修改入库单细表记录
	 */
	public boolean updateBuyInDetail( BuyInDetail buyInDetail ) {
		return buyInDetailDao.updateBuyInDetail( buyInDetail );
	}

	/**
	 * 为修改，根据 Id 查一条 入库单子表记录
	 */
	public BuyInDetail getOneBuyInDetailForUpdate( int buyInDetailId ) {
		return buyInDetailDao.getOneBuyInDetailForUpdate( buyInDetailId );
	}
}
